package com.ict.web.msg.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * 操作通知 sys_msg
 *
 * @author xupeng
 * @date 2021-11-19
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_msg")
@ApiModel(value = "SysMsg对象", description = "操作通知")
public class SysMsg extends Model<SysMsg>
{
    /**状态（0开放*/
    public final static String STATUS_NORMAL = "0";
    /**状态（1关闭）*/
    public final static String STATUS_UNNORMAL = "1";
    /**阅读标签（0未阅读*/
    public final static String READ_FLAG_NORMAL = "0";
    /**阅读标签（1已阅）*/
    public final static String READ_FLAG_UNNORMAL = "1";

    /**资源类型{1大数据局}*/
    public final static String RESOURCE_TYPE_DATA = "1";
    /**资源类型{2项目单位} */
    public final static String RESOURCE_TYPE_UNIT = "2";
    /**资源类型{3三方机构}*/
    public final static String RESOURCE_TYPE_THIRD_ORG = "3";

    @ApiModelProperty(value = "id")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

    @ApiModelProperty(value = "标题")
    @TableField("title")
    private String title;

    @ApiModelProperty(value = "内容")
    @TableField("content")
    private String content;

    @ApiModelProperty(value = "1大数据局，2项目单位 3三方机构")
    @TableField("resource_type")
    private String resourceType;

    @ApiModelProperty(value = "关联资源id")
    @TableField("resource_id")
    private String resourceId;

    @ApiModelProperty(value = "状态（0开放，1关闭）")
    @TableField("msg_status")
    private String msgStatus;

    @ApiModelProperty(value = "阅读标签（0未阅读，1已阅）")
    @TableField("read_flag")
    private String readFlag;

    @ApiModelProperty(value = "收件人id")
    @TableField("receive_user_id")
    private Long receiveUserId;

    @ApiModelProperty(value = "创建人")
    @TableField("create_by")
    private String createBy;

    @ApiModelProperty(value = "创建时间")
    @TableField("create_time")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "修改人")
    @TableField("update_by")
    private String updateBy;

    @ApiModelProperty(value = "修改时间")
    @TableField("update_time")
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "文件id")
    @TableField("file_id")
    private String fileId;

    @ApiModelProperty(value = "公告id")
    @TableField("notice_id")
    private Long noticeId;

    @ApiModelProperty(value = "年度计划id")
    @TableField("plan_id")
    private Long planId;
}
